<?php
namespace Home\Controller;
use Think\Controller;
class BaseController extends Controller
{
    public function _initialize()
      {
        header("Content-type:text/html;charset=utf-8");
         if(ACTION_NAME!=='logout'){
            $this->checkUser();
        }
    }
    
    private function checkUser()
    {
        if (!session('?tel')) {
            $this->error('请您登陆成功后再进行此操作', U('Home/users/login'));
        }
    }
    public function at()
    {
        $localtime = date('Y-m-d H:i:s', time());
        return $localtime;
    }
 
    public function show_bug($val)
    {
        echo "<pre>";
        echo var_dump($val);
        echo "</pre>";
        die();
    }

}